package model

import (
	"api/database"
	"github.com/jinzhu/gorm"
)

type MessageRecordModel struct {
	BaseModel
	gorm.Model
	Code int
	Topic string
	Message string
	Data string
	Did uint
}

func NewMessageRecordModel() *MessageRecordModel {
	return &MessageRecordModel{}
}

func (MessageRecordModel) TableName() string {
	return "message_record"
}


func (mr *MessageRecordModel) Insert() (interface{}, error) {
	database.GetDB().Model(&mr).Save(&mr)
	return nil,nil
}



